/**
* Copyright (c) 2013-2014, qtone Inc. All Rights Reserved.
*
* mybatis mapper基类
*
* @param <PK>
*			主键
* @param <E>
*			领域对象
* @param <C>
*			领域查询对象
* @author: tanghuaicheng
* Project Name: testuc
* $Id:   2017-01-11 10:54:07 $
*/

package com.bangcommunity.bbframe.mybatis.mapper;

import com.bangcommunity.bbframe.mybatis.criteria.AbstractorCriteria;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

public interface BaseMapper<PK extends Serializable, E extends Serializable, C extends AbstractorCriteria> {
    int countByExample(C example);

    int deleteByPrimaryKey(PK id);

    int deleteByExample(C example);

    int insert(E record);

    int batchInsert(List<E> list);

//    int insertSelective(E record);

    List<E> selectByExample(C example);

    E selectByPrimaryKey(PK id);

    int updateByExampleSelective(@Param("record") E record, @Param("example") C example);

    int updateByPrimaryKeySelective(E record);

}